package com.youlian.cloud.system.config.aspect;

import com.youlian.cloud.core.config.ValidAspect;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;

/**
 * 方法实体的参数校验
 *
 * @author : liukx
 * @create : 2018/6/6 13:55
 * @email : liukx@elab-plus.com
 */
@Aspect
@EnableAspectJAutoProxy
@Configuration
@Import({ValidAspect.class})
public class ValidAspectBean {

    @Autowired
    private ValidAspect validAspect;

    @Before(value = "execution(* com.youlian.cloud.system.service..*.*(..))")
    public void before(JoinPoint point) {
        validAspect.before(point);
    }
}
